<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCustomsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('customs', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name',20)->default('');
            $table->integer('custom_type')->unsigned()->default(0)->index();
            $table->integer('region_id')->unsigned()->default(0);
            $table->integer('user_id')->unsigned()->default(0)->index();
            $table->string('address',50)->default('');
            $table->integer('happy')->unsigned()->default(0);
            $table->integer('credit')->unsigned()->default(0);
            $table->integer('status')->unsigned()->default(0)->index();
            $table->string('phone',15)->default('');
            $table->string('fax',15)->default('');
            $table->string('zipcode',10)->default('');
            $table->string('website',20)->default('');
            $table->string('biz_licence',30)->default('');
            $table->string('boss',10)->default('');
            $table->string('regist_capital',10)->default('');
            $table->string('bank_name',50)->default('');
            $table->string('bank_no',20)->default('');
            $table->integer('last_order_datetime')->unsigned()->default(0);
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('customs');
    }
}
